package com.hymall.controller.admin;

import com.hymall.bean.common.BasePageInfo;
import com.hymall.bean.common.BaseRespVo;
import com.hymall.bean.common.CommonData;
import com.hymall.service.admin.MarketLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 叶熠彬
 * @description: 系统管理 -> 显示操作日志
 * @date: 2022/7/17 13:21
 */
@RestController
@RequestMapping("admin/log")
public class MarketLogController {

    @Autowired
    MarketLogService marketLogService;


    /**
     * 显示操作日志信息，可选按管理员名称查找
     *
     * @author: 叶熠彬
     * @date: 2022/7/17 13:28
     * @param: []
     * @return: com.hymall.bean.common.BaseRespVo
     */
    @GetMapping("list")
    public BaseRespVo list(String name, BasePageInfo info) {
        CommonData data = marketLogService.queryLogList(name, info);
        return BaseRespVo.ok(data);
    }
}
